package com.hoshiicloud.saleorder.param;

import com.hoshiicloud.common.query.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 查询订单信息参数
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "查询订单信息", description = "查询订单信息")
public class OrderMainQueryParam extends PageParam {


    @ApiModelProperty(value = "主订单号")
    private String mainNo;

    @ApiModelProperty(value = "主订单类别   1-实物订单  2-服务订单")
    private Integer type;
    @ApiModelProperty(value = "渠道  1-线上 2-线下")
    private Integer channel;
    @ApiModelProperty(value = "1（APP_ANDROID ），2（APP_IOS），3（WEB_MOBILE），4（WEB_PC），5（SMALL_ROUTINE_ANDROID），6（SMALL_ROUTINE_IOS）")
    private Integer source;
    @ApiModelProperty(value = "结算方式  1-一次结清  2 分期付款")
    private Integer settlement;
    @ApiModelProperty(value = "租户ID")
    private Long companyId;

    @ApiModelProperty(value = "平台ID")
    private Long platformId;

    @ApiModelProperty(value = "店铺ID")
    private Long storeId;

    @ApiModelProperty(value = "会员ID")
    private Long memberId;

    @ApiModelProperty(value = "收货人的姓名")
    private String consignee;

    @ApiModelProperty(value = "收货人的国家region")
    private Long country;

    @ApiModelProperty(value = "国家名称")
    private String countryName;

    @ApiModelProperty(value = "收货人的省份")
    private Long province;

    @ApiModelProperty(value = "省份名称")
    private String provinceName;

    @ApiModelProperty(value = "收货人的城市")
    private Long city;

    @ApiModelProperty(value = "城市名称")
    private String cityName;

    @ApiModelProperty(value = "收货人的地区")
    private Long district;

    @ApiModelProperty(value = "地区名称")
    private String districtName;

    @ApiModelProperty(value = "收货人的详细地址")
    private String address;

    @ApiModelProperty(value = "收货人的邮编")
    private String zipCode;

    @ApiModelProperty("收货人昵称")
    private String nickName;

    @ApiModelProperty(value = "收货人的电话")
    private String telephone;

    @ApiModelProperty(value = "收货人的手机")
    private String mobile;

    @ApiModelProperty(value = "收货人的邮箱")
    private String email;

    @ApiModelProperty(value = "收货人的最佳送货时间")
    private String bestTime;

    @ApiModelProperty(value = "收货人的地址的标志性建筑")
    private String signBuilding;

    @ApiModelProperty(value = "订单附言，由用户提交订单前填写")
    private String postscript;

    @ApiModelProperty(value = "用户选择的配送方式id，取值表shipping")
    private Integer shippingId;

    @ApiModelProperty(value = "用户选择的配送方式的名称，取值表shipping")
    private String shippingName;

    @ApiModelProperty(value = "用户选择的支付方式的id，取值表payment")
    private Integer payId;

    @ApiModelProperty(value = "用户选择的支付方式的名称，取值表payment")
    private String payName;

    @ApiModelProperty(value = "缺货处理方式，等待所有商品备齐后再发； 取消订单；与店主协商")
    private String howOos;

    @ApiModelProperty(value = "包装名称，取值表pack")
    private String packName;

    @ApiModelProperty(value = "包装id，取值取值表pack")
    private Integer packId;

    @ApiModelProperty(value = "发票类型，用户页面选择")
    private String invType;

    @ApiModelProperty(value = "发票抬头，用户页面填写")
    private String invPayee;

    @ApiModelProperty(value = "发票内容，用户页面选择")
    private String invContent;

    @ApiModelProperty(value = "订单的来源页面")
    private String referer;

    @ApiModelProperty(value = "发货单号，发货时填写，可在订单查询查看")
    private String invoiceNo;

    @ApiModelProperty(value = "商家给客户的留言,当该字段有值时可以在订单查询看到")
    private String toBuyer;

    @ApiModelProperty(value = "付款备注，在订单管理里编辑修改")
    private String payNote;

    @ApiModelProperty(value = "商品总金额")
    private BigDecimal goodsAmount;

    @ApiModelProperty(value = "配送费用")
    private BigDecimal shippingFee;

    @ApiModelProperty(value = "保价费用")
    private BigDecimal insureFee;

    @ApiModelProperty(value = "支付费用(,跟支付方式的配置相关，取值表payment)")
    private BigDecimal payFee;

    @ApiModelProperty(value = "包装费用，取值表取值表pack")
    private BigDecimal packFee;

    @ApiModelProperty(value = "发票税额")
    private BigDecimal tax;

    @ApiModelProperty(value = "积分数")
    private Long points;

    @ApiModelProperty(value = "应付款金额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "订单实付金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "退款金额")
    private BigDecimal backAmount;

    @ApiModelProperty(value = "优惠券金额（抵扣金额）")
    private BigDecimal benefitsAmount;

    @ApiModelProperty(value = "余额抵扣金额")
    private BigDecimal balanceAmount;

    @ApiModelProperty(value = "金币（积分）金额")
    private BigDecimal coinsAmount;

    @ApiModelProperty(value = "是否删除 0- 未删 1-已删除")
    private Integer deleted;

    @ApiModelProperty(value = "付款时间")
    private LocalDateTime paidTime;

    @ApiModelProperty(value = "取消时间")
    private LocalDateTime cancelledTime;

    @ApiModelProperty(value = "交付时间")
    private LocalDateTime deliveryTime;

    @ApiModelProperty(value = "收货时间")
    private LocalDateTime receivedTime;

    @ApiModelProperty(value = "更新人")
    private String updatedBy;
    /**
     * 订单状态:
     * <p>0: 等待买家付款</p>
     * <p>1: 订单取消(超时未付款, 买家, 商家) 没有付钱订单取消</p>
     * <p>2: 等待商家发货</p>
     * <p>3: 等待买家收货</p>
     * <p>4: 备货中(自提订单使用)</p>
     * <p>5: 等待买家提货</p>
     * <p>6: 等待商家配送</p>
     * <p>7: 配送中  这里是可以退款的</p>
     * <p>8: 订单关闭   退款属于订单关闭</p>
     * <p>9: 交易成功</p>
     * <p>10: 订单归档另外加字段还是添加这个状态码</p>
     */
    @ApiModelProperty(value ="0: 等待买家付款 1: 订单取消(超时未付款, 买家, 商家) 没有付钱订单取消 2: 等待商家发货 3: 等待买家收货 4: 备货中(自提订单使用) 5: 等待买家提货 6: 等待商家配送 7: 配送中  这里是可以退款的 8: 订单关闭   退款属于订单关闭 9: 交易成功 10: 订单归档另外加字段还是添加这个状态码" )
    private Integer orderStatus;

    @ApiModelProperty(value = "商品配送情况 0，未发货；1，已发货 2-部分发货   3，已收货；4 部分收货 5 ，备货中")
    private Integer shippingStatus;

    @ApiModelProperty(value = "支付状态 0-未支付 1-已支付 2-已退款 3-部分退款")
    private Integer payStatus;

    @ApiModelProperty(value = "售后状态  0-未售后 1-已售后 2-部分售后")
    private Integer serviceStatus;

    @ApiModelProperty(value = "评价状态  0-未评价 1-已评价")
    private Integer commented;

    @ApiModelProperty(value = "归档状态  0-未归档 1-已归档")
    private Integer archived;

    @ApiModelProperty(value = "收货地址ID（关联收货地址表)")
    private Integer addressId;

    @ApiModelProperty(value = "订单创建开始时间")
    private String createdStartTime;

    @ApiModelProperty(value = "订单创建结束时间")
    private String createdEndTime;

    @ApiModelProperty(value = "订单状态类型")
    private Integer orderStatusType;
}
